int lengthOfLongestSubstring(char* s)
{
    if (strlen(s) == 0)
        return 0;
    int max = 1;
    for (int i = 0; s[i] != '\0'; i++)
    {
        bool check[256] = { 0 };
        check[s[i]] = true;
        int j = i + 1;
        for (j = i + 1; s[j] != '\0'; j++)
        {
            if (check[s[j]])
                break;
            else
                check[s[j]] = true;
        }
        max = max > (j - i) ? max : j - i;
    }
    return max;
}